If the contact is present and the bspStatus of the contact is not null then you can send an OTP template message using createAndSendMessage API. Also you can check other fields like collections and fields of the contact using the API in point no 2.
If the contact is not present on Glific then you need to
Create a contact using createContact API
Optin the contact using optin API provided you have taken consent from the user in any form
Send the OTP template using the API mentioned in point 3